package com.hs.egova.exception;

import com.hs.egova.base.ResultInfo;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author husheng
 * @version v1.0
 * @date 2021/7/27 16:21
 * @email husheng@egova.com.cn
 */
@EgovaExceptionHandler
public class EgovaCommonExceptionHandler {

    @ResponseBody
    @EgovaExceptionHandlemethod(EgovaCommonException.class)
    public ResultInfo commonHandler(EgovaCommonException egovaCommonException) {
        String message = egovaCommonException.getMessage();
        return new ResultInfo(false, message);
    }
}
